package com.bank.backend.boot.server.controller;


import com.bank.backend.boot.base.model.vo.BankUserVO;
import com.bank.backend.boot.server.annotation.ResponseResult;
import com.bank.backend.boot.server.service.BankUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 银行用户
 *
 * @author jiaowei
 * @since 2025/3/24 19:05
 */
@Slf4j
@Tag(name = "银行用户")
@RestController
@RequestMapping("/bank/user")
public class BankUserController {
    @Resource
    private BankUserService bankUserService;


    @Operation(summary = "获取当前银行用户信息")
    @GetMapping("/getBankUser")
    @ResponseResult
    public BankUserVO getBankUserVo() {
        return bankUserService.getBankUserVO();
    }


    @Operation(summary = "根据用户id获取银行用户信息")
    @GetMapping("/getBankUserById/{id}")
    @ResponseResult
    public BankUserVO getBankUserById(@PathVariable(value = "id") Long id) {
        return bankUserService.getBankUserByIdVO(id);
    }
}
